var data = [{
        province: '湖北省',
        cities: ['武汉市', '黄冈市', '鄂州市', '孝感市']
    },
    {
        province: '江苏省',
        cities: ['南京市', '苏州市', '常州市', '泰州市']
    }
]

var oSF = document.querySelector('#province');
var oCS = document.querySelector('#city');
oSF.addEventListener('change', function() {
    oCS.options.length = 1;
    var val = oSF.value;
    console.log(val);
    var current = [];
    for (let item of data) {
        if (item.province == val) {
            current = item.cities;
        }
    }
    current.forEach((item, index, arr) => {
        var opt = document.createElement('option');
        var text = document.createTextNode(item);
        opt.appendChild(text);
        oCS.appendChild(opt);
    })
}, false)